<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use DB;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        //
        //监听 数据库 操作。
//        DB::listen(function($sql,$bindings=[],$time=0){
//            var_dump($sql);
//            echo 'SQL语句执行：'.'$sql'.'，参数：'.json_encode($bindings).',耗时：'.$time.'ms';
//        });
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
